package com.leunpha.mini.spider.listener;

import com.leunpha.mini.net.events.NetEvent;
import com.leunpha.mini.net.events.NetState;
import com.leunpha.mini.net.listener.Listener;

/**
 * User: zhoujingjie
 * Date: 14-6-30
 * Time: 下午4:59
 */
public abstract class SpiderEndListener<T> extends Listener{
    @Override
    public void update(NetEvent event) {
        if(event.getState() == NetState.END)
            end((T) event.getValue());
    }

    public abstract void end(T bean);
}

